package com.yuanfeng.payment.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户资源表
 * @TableName pay_user_resource
 */
@TableName(value ="pay_user_resource")
@Data
public class PayUserResourceEntity implements Serializable {
    /**
     * 用户id
     */
    @TableId
    private String userId;

    /**
     * 待结算余额(废弃)
     */
    private BigDecimal userMoneyPendingSettlement;

    /**
     * 用户资金-预付款充值、转账、结算后的款项等等
     */
    private BigDecimal userMoney;

    /**
     * 用户充值套餐金额(废弃)
     */
    private BigDecimal userPackageMoney;

    /**
     * 冻结余额
     */
    private BigDecimal userMoneyFrozen;

    /**
     * 充值卡余额-只能从来购物
     */
    private BigDecimal userRechargeCard;

    /**
     * 充值卡冻结余额
     */
    private BigDecimal userRechargeCardFrozen;

    /**
     * 用户大宝账户
     */
    private BigDecimal userBigTreasure;

    /**
     * 
     */
    private BigDecimal userBigTreasureFrozen;

    /**
     * 用户小宝账户
     */
    private BigDecimal userSmallTreasure;

    /**
     * 积分
     */
    private BigDecimal userPoints;

    /**
     * 冻结积分
     */
    private BigDecimal userPointsFrozen;

    /**
     * 信用额度
     */
    private BigDecimal userCreditLimit;

    /**
     * 可用额度
     */
    private BigDecimal userCreditAvailability;

    /**
     * 已还信用额度
     */
    private BigDecimal userCreditReturn;

    /**
     * 白条还款周期
     */
    private Integer userCreditCycle;

    /**
     * 成长值
     */
    private Integer userGrowth;

    /**
     * 蜂卡金额
     */
    private BigDecimal userFixedRechargeCard;

    /**
     * 创建者
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改人
     */
    private String updateUser;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 是否删除0:否;1:是
     */
    private Integer isDelete;

    /**
     * 版本号
     */
    private Integer sysVersion;

    /**
     * 时间戳
     */
    private Date ts;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PayUserResourceEntity other = (PayUserResourceEntity) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUserMoneyPendingSettlement() == null ? other.getUserMoneyPendingSettlement() == null : this.getUserMoneyPendingSettlement().equals(other.getUserMoneyPendingSettlement()))
            && (this.getUserMoney() == null ? other.getUserMoney() == null : this.getUserMoney().equals(other.getUserMoney()))
            && (this.getUserPackageMoney() == null ? other.getUserPackageMoney() == null : this.getUserPackageMoney().equals(other.getUserPackageMoney()))
            && (this.getUserMoneyFrozen() == null ? other.getUserMoneyFrozen() == null : this.getUserMoneyFrozen().equals(other.getUserMoneyFrozen()))
            && (this.getUserRechargeCard() == null ? other.getUserRechargeCard() == null : this.getUserRechargeCard().equals(other.getUserRechargeCard()))
            && (this.getUserRechargeCardFrozen() == null ? other.getUserRechargeCardFrozen() == null : this.getUserRechargeCardFrozen().equals(other.getUserRechargeCardFrozen()))
            && (this.getUserBigTreasure() == null ? other.getUserBigTreasure() == null : this.getUserBigTreasure().equals(other.getUserBigTreasure()))
            && (this.getUserBigTreasureFrozen() == null ? other.getUserBigTreasureFrozen() == null : this.getUserBigTreasureFrozen().equals(other.getUserBigTreasureFrozen()))
            && (this.getUserSmallTreasure() == null ? other.getUserSmallTreasure() == null : this.getUserSmallTreasure().equals(other.getUserSmallTreasure()))
            && (this.getUserPoints() == null ? other.getUserPoints() == null : this.getUserPoints().equals(other.getUserPoints()))
            && (this.getUserPointsFrozen() == null ? other.getUserPointsFrozen() == null : this.getUserPointsFrozen().equals(other.getUserPointsFrozen()))
            && (this.getUserCreditLimit() == null ? other.getUserCreditLimit() == null : this.getUserCreditLimit().equals(other.getUserCreditLimit()))
            && (this.getUserCreditAvailability() == null ? other.getUserCreditAvailability() == null : this.getUserCreditAvailability().equals(other.getUserCreditAvailability()))
            && (this.getUserCreditReturn() == null ? other.getUserCreditReturn() == null : this.getUserCreditReturn().equals(other.getUserCreditReturn()))
            && (this.getUserCreditCycle() == null ? other.getUserCreditCycle() == null : this.getUserCreditCycle().equals(other.getUserCreditCycle()))
            && (this.getUserGrowth() == null ? other.getUserGrowth() == null : this.getUserGrowth().equals(other.getUserGrowth()))
            && (this.getUserFixedRechargeCard() == null ? other.getUserFixedRechargeCard() == null : this.getUserFixedRechargeCard().equals(other.getUserFixedRechargeCard()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
            && (this.getSysVersion() == null ? other.getSysVersion() == null : this.getSysVersion().equals(other.getSysVersion()))
            && (this.getTs() == null ? other.getTs() == null : this.getTs().equals(other.getTs()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUserMoneyPendingSettlement() == null) ? 0 : getUserMoneyPendingSettlement().hashCode());
        result = prime * result + ((getUserMoney() == null) ? 0 : getUserMoney().hashCode());
        result = prime * result + ((getUserPackageMoney() == null) ? 0 : getUserPackageMoney().hashCode());
        result = prime * result + ((getUserMoneyFrozen() == null) ? 0 : getUserMoneyFrozen().hashCode());
        result = prime * result + ((getUserRechargeCard() == null) ? 0 : getUserRechargeCard().hashCode());
        result = prime * result + ((getUserRechargeCardFrozen() == null) ? 0 : getUserRechargeCardFrozen().hashCode());
        result = prime * result + ((getUserBigTreasure() == null) ? 0 : getUserBigTreasure().hashCode());
        result = prime * result + ((getUserBigTreasureFrozen() == null) ? 0 : getUserBigTreasureFrozen().hashCode());
        result = prime * result + ((getUserSmallTreasure() == null) ? 0 : getUserSmallTreasure().hashCode());
        result = prime * result + ((getUserPoints() == null) ? 0 : getUserPoints().hashCode());
        result = prime * result + ((getUserPointsFrozen() == null) ? 0 : getUserPointsFrozen().hashCode());
        result = prime * result + ((getUserCreditLimit() == null) ? 0 : getUserCreditLimit().hashCode());
        result = prime * result + ((getUserCreditAvailability() == null) ? 0 : getUserCreditAvailability().hashCode());
        result = prime * result + ((getUserCreditReturn() == null) ? 0 : getUserCreditReturn().hashCode());
        result = prime * result + ((getUserCreditCycle() == null) ? 0 : getUserCreditCycle().hashCode());
        result = prime * result + ((getUserGrowth() == null) ? 0 : getUserGrowth().hashCode());
        result = prime * result + ((getUserFixedRechargeCard() == null) ? 0 : getUserFixedRechargeCard().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        result = prime * result + ((getSysVersion() == null) ? 0 : getSysVersion().hashCode());
        result = prime * result + ((getTs() == null) ? 0 : getTs().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", userMoneyPendingSettlement=").append(userMoneyPendingSettlement);
        sb.append(", userMoney=").append(userMoney);
        sb.append(", userPackageMoney=").append(userPackageMoney);
        sb.append(", userMoneyFrozen=").append(userMoneyFrozen);
        sb.append(", userRechargeCard=").append(userRechargeCard);
        sb.append(", userRechargeCardFrozen=").append(userRechargeCardFrozen);
        sb.append(", userBigTreasure=").append(userBigTreasure);
        sb.append(", userBigTreasureFrozen=").append(userBigTreasureFrozen);
        sb.append(", userSmallTreasure=").append(userSmallTreasure);
        sb.append(", userPoints=").append(userPoints);
        sb.append(", userPointsFrozen=").append(userPointsFrozen);
        sb.append(", userCreditLimit=").append(userCreditLimit);
        sb.append(", userCreditAvailability=").append(userCreditAvailability);
        sb.append(", userCreditReturn=").append(userCreditReturn);
        sb.append(", userCreditCycle=").append(userCreditCycle);
        sb.append(", userGrowth=").append(userGrowth);
        sb.append(", userFixedRechargeCard=").append(userFixedRechargeCard);
        sb.append(", createUser=").append(createUser);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", sysVersion=").append(sysVersion);
        sb.append(", ts=").append(ts);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}